package com.chy.blog_web.modular.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chy.blog_web.modular.web.entity.BoPersonalDiary;
import com.chy.blog_web.modular.web.mapper.BoPersonalDiaryMapper;
import com.chy.blog_web.modular.web.service.IBoImgLogService;
import com.chy.blog_web.modular.web.service.IBoPersonalDiaryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


/**
 * 描述：个人日志表 service业务层
 * 作者：chenhuiyan
 * 时间：2020/03/03 12:03
 */
@Service
@Transactional(readOnly = true)
public class BoPersonalDiaryServiceImpl extends ServiceImpl<BoPersonalDiaryMapper, BoPersonalDiary> implements IBoPersonalDiaryService {

    @Autowired
    private IBoImgLogService boImgLogService;

    private final static Logger logger = LoggerFactory.getLogger(BoPersonalDiaryServiceImpl.class);

    /**
     * 查询日记类型为个人日记列表，并按时间降序排列
     * @param params
     * @return
     */
    public List<Map<String, Object>> list(Map<String, Object> params){
        return baseMapper.list(params);
    }

    /**
     * 根据编号查询
     * @return
     */
    public Map<String, Object> getDiaryInfo(String id){
        return baseMapper.getDiaryInfo(id);
    }

}
